package com.bootdo.repertory.controller;

import com.bootdo.common.utils.PageUtils;
import com.bootdo.common.utils.Query;
import com.bootdo.common.utils.R;
import com.bootdo.sell.domain.CpDO;
import com.bootdo.sell.service.CpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * 套餐关联表
 * 
 * @author mp
 * @email 1992lcg@163.com
 * @date 2020-03-02 09:22:07
 */
 
@Controller
@RequestMapping("/repertory/ccp")
public class CcpController {
	@Autowired
	private CpService cpService;
	
	@GetMapping()
	String Cp(){
	    return "sell/cp/cp";
	}


	@ResponseBody
	@PostMapping("/save")
	public R save( CpDO cp){
		if(cpService.save(cp)>0){
			return R.ok();
		}
		return R.error();
	}
	
}
